﻿// TextInfoDlg.cpp: 实现文件
//

#include "pch.h"
#include "main.h"
#include "TextInfoDlg.h"
#include "afxdialogex.h"


// CTextInfoDlg 对话框

IMPLEMENT_DYNAMIC(CTextInfoDlg, CDialogEx)

CTextInfoDlg::CTextInfoDlg(CWnd* pParent /*=nullptr*/)
	: CDialogEx(IDD_EDIT, pParent)
{

}

CTextInfoDlg::~CTextInfoDlg()
{
}

void CTextInfoDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialogEx::DoDataExchange(pDX);
}


BEGIN_MESSAGE_MAP(CTextInfoDlg, CDialogEx)
END_MESSAGE_MAP()


// CTextInfoDlg 消息处理程序
BOOL CTextInfoDlg::OnInitDialog()
{
	CDialogEx::OnInitDialog();
	SetIcon(AfxGetApp()->LoadIcon(IDR_MAINFRAME), TRUE);
	SetIcon(AfxGetApp()->LoadIcon(IDR_MAINFRAME), FALSE);
	SetWindowPos(NULL, 0, 0, m_width, m_height, SWP_NOZORDER | SWP_NOMOVE);
	SetWindowText(m_strCaption);
	RECT rc;
	GetClientRect(&rc);
	CEdit *edit = (CEdit *)GetDlgItem(IDC_EDIT1);
	edit->ShowWindow(SW_SHOW);
	edit->SetWindowText(m_strText);
	edit->SetWindowPos(NULL, 0, 0, rc.right, rc.bottom, SWP_NOZORDER);
	return FALSE;
}
